<script setup>
const props = defineProps({
    title: {
      type: String
    }
  })
</script>

<template>
  <div>
    <div class="item_title" v-if="title !== ''">
      <!-- <div class="zuo"></div> -->
      <span class="title-inner"> &nbsp;&nbsp;{{ title }}&nbsp;&nbsp; </span>
      <!-- <div class="you"></div> -->
    </div>
    <div
      :class="title !== '' ? 'item_title_content' : 'item_title_content_def'"
    >
      <slot></slot></div>
    </div>
</template>

<style scoped lang="scss">
$item-title-height: 50px;
$item-title-line-height: 55px;
$item_title_content-height: calc(100% - 50px);

.item_title {
  height: $item-title-height;
  // line-height: $item-title-line-height;
  width: 100%;
  background: url("@/assets/img/image1.png") no-repeat;
  background-size: 80% 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  .zuo,
  .you {
    width: 58px;
    height: 14px;
    background-image: url("@/assets/img/titles/zuo.png");
  }

  .you {
    transform: rotate(180deg);
  }
  .title-inner {
    font-style: oblique;
    font-weight: bold;
    // letter-spacing: 2px;
    color: #fff;
    font-size: 26px;
    // background: linear-gradient(
    //   92deg,
    //   #0072ff 0%,
    //   #00eaff 48.8525390625%,
    //   #01aaff 100%
    // );
    // -webkit-background-clip: text;
    // -webkit-text-fill-color: transparent;
  }
}

:deep(.dv-border-box-content)  {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

.item_title_content {
  height: $item_title_content-height;
}

.item_title_content_def {
  width: 100%;
  height: 100%;
}
</style>
